//
//  OLsportMainSportViewController.m
//  heimaxing
//
//  Created by tony.唐 on 16/11/9.
//  Copyright © 2016年 xiedonglai. All rights reserved.
//

#import "OLsportMainSportViewController.h"
#import "OLsportTrackingViewController.h"
#import "OLsportTracking.h"
@interface OLsportMainSportViewController ()

@end

@implementation OLsportMainSportViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/// 开始运动的按钮
- (IBAction)sportStat:(UIButton *)sender {
    
     //1. 根据按钮的tag 区分运动类型
    OLSportType type = sender.tag;
    // 2.实例化键控控制器
    OLsportTrackingViewController* vc = [[OLsportTrackingViewController alloc
                                         ]init];
    //3. 设置运动类型
    vc.sportTracking = [[OLsportTracking alloc] initWithType:type];
    

    // 展示控制器
    [self presentViewController:vc animated:YES completion:nil];
    
}


@end
